import Vue from 'vue';
import Vuex from 'vuex';
import axios from 'axios';

Vue.use(Vuex);

export default new Promise(async resolve => resolve(new Vuex.Store({
    state: {
        login: Array.isArray(await Vue.http.post('tools_banner/getBannerList?login')),
    },
    mutations: {
        login(state) {
            state.login = true;
        },

        logout(state) {
            state.login = false;
        },
    },
})));
